//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.vere.orm.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;

public class ClassItem {
    private String name;
    private String table;
    private String keyName;
    private String generator;
    private ConcurrentHashMap<String, Property> propertyMap = new ConcurrentHashMap();

    public ClassItem() {
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTable() {
        return this.table;
    }

    public void setTable(String table) {
        this.table = table;
    }

    public ConcurrentHashMap<String, Property> getPropertyMap() {
        return this.propertyMap;
    }

    public void setPropertyMap(ConcurrentHashMap<String, Property> propertyMap) {
        this.propertyMap = propertyMap;
    }

    public String getKeyName() {
        return this.keyName;
    }

    public void setKeyName(String keyName) {
        this.keyName = keyName;
    }

    public String getGenerator() {
        return this.generator;
    }

    public void setGenerator(String generator) {
        this.generator = generator;
    }

    public Map<String, Property> getColumnPropertyMap() {
        Map<String, Property> columnPropertyMap = new HashMap();
        Iterator iter = this.propertyMap.entrySet().iterator();

        while(iter.hasNext()) {
            Entry<String, Property> entry = (Entry)iter.next();
            Property property = (Property)entry.getValue();
            columnPropertyMap.put(property.getColumn(), property);
        }

        return columnPropertyMap;
    }

    public List<Property> getPropertyList() {
        List<Property> propertyList = new ArrayList();
        Iterator iter = this.propertyMap.entrySet().iterator();

        while(iter.hasNext()) {
            Entry<String, Property> entry = (Entry)iter.next();
            Property property = (Property)entry.getValue();
            propertyList.add(property);
        }

        return propertyList;
    }
}
